set(libpipeline_src
    default_params.cpp
    error.cpp
    parse_command_line.cpp
    clean_filterbank_rfi.cu 
    get_rms.cu matched_filter.cu 
    remove_baseline.cu 
    find_giants.cu 
    label_candidate_clusters.cu 
    merge_candidates.cu 
    pipeline.cu 
    measure_bandpass.cu 
    median_filter.cu 
    matched_filter.cu
)

add_library(heimdallpipe SHARED ${libpipeline_src})

# target_link_libraries(heimdallpipe PUBLIC dedisp heimdallnet m)
target_link_libraries(heimdallpipe PUBLIC m)

target_compile_options(heimdallpipe PRIVATE 
    $<$<COMPILE_LANGUAGE:CUDA>:--expt-extended-lambda>
)

install(TARGETS heimdallpipe LIBRARY DESTINATION lib)